const { build, pause, concat } = require('./build');

var files = [
	"adddf3",
	"addsf3",
	"clzsi2",
	"divdf3",
	"divsf3",
	"eqdf2",
	"eqsf2",
	"extendsfdf2",
	"fixdfdi",
	"fixdfsi",
	"fixsfdi",
	"fixsfsi",
	//"fixtfdi",
	//"fixtfsi",
	"fixunsdfdi",
	"fixunsdfsi",
	"fixunssfdi",
	"fixunssfsi",
	//"fixunstfdi",
	//"fixunstfsi",
	"float",
	"floatdidf",
	"floatdisf",
	"floatsidf",
	"floatsisf",
	"floatundidf",
	"floatundisf",
	"floatunsidf",
	"floatunsisf",
	"gedf2",
	"gesf2",
	"ledf2",
	"lesf2",
	"muldf3",
	"mulsf3",
	"negdf2",
	"negsf2",
	"sqrtdf2",
	"sqrtsf2",
	"subdf3",
	"subsf3",
	"truncdfsf2",
	//"trunctfdf2",
	//"trunctfsf2",
	"unorddf2",
	"unordsf2",
]

var proc = async () => {

	var hardFloat = process.argv[2] == "hardFloat";
	var cpp = false;
	var param = [];//["-I./soft-fp"];

	var targets = [];
	for (var i = 0; i < files.length; i++) {
		var ret = await build("soft-fp/" + files[i], hardFloat, cpp, param);
		targets.push(ret);
	}

	concat(targets, "soft-fp.s");

	//pause();
}
proc();

//setTimeout(() => { }, 100000);
